function commentOpen(id,gid)
{
	$('#rcomment_'+id).toggle('fast');
}

//Ctrl+Enter 回复评论

function keyRecomment(rid,tid,event)
{
	if(event.ctrlKey == true)
	{
		if(event.keyCode == 13)
			recomment(rid,tid);
		return false;
	}
}

//回复评论
function recomment(rid,tid,token){

	c = $('#recontent_'+rid).val();
	if(c==''){alert('回复内容不能为空');return false;}
	$('#recomm_btn_'+rid).hide();
	$.ajax({
		type: "POST",
		url: siteUrl+'index.php?app=article&ac=comment&ts=recomment',
		data: {referid:rid,articleid:tid,content:c,'token':token}

	});
	window.location.reload();

}

function recommend(articleid){

	if(confirm("点赞会把您的5分转让给对方，您确定要点赞吗？")) {

		$.post(siteUrl + 'index.php?app=article&ac=recommend', {'articleid': articleid}, function (rs) {

			if (rs == 0) {

				tsNotice('一个赞消耗5分，您的积分不够点赞');

			} else if (rs == 1) {

				window.location.reload()
			}
		})

	}
}